home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / comm / tcp / WebTV11.lha / WebTV / Install WebTV < prev    next >
Encoding:
Text File  |  1998-03-05  |  4.3 KB  |  230 lines

  1. ; $VER: Install WebTV 1.1 (5.3.98)
  2. ;
  3. ; WebTV webcam viewer, by Troels Walsted Hansen <troels@stud.cs.uit.no>
  4. ; Copyright Ultima Thule Software © 1998, All Rights Reserved.
  5. ;
  6. ; Installer script for WebTV.
  7.  
  8. (set #exitmsg "\n\nThank you for installing WebTV.\n\nRemember to register if you use it for more than 30 days.")
  9.  
  10. ; Welcome screen
  11.  
  12. (welcome "\nThis installer script will install WebTV.\nThe ultimate webcam viewer")
  13.  
  14. ; Check the environment
  15.  
  16. (if (< (/ @installer-version 65536) 43)
  17.     (abort "The WebTV installation script needs Installer\n"
  18.     "version 43 or higher. It is available from Aminet.")
  19. )
  20.  
  21. (if (< (/ (getversion) 65536) 39)
  22.     (abort "WebTV needs AmigaOS 3.0 or higher.\n")
  23. )
  24.  
  25. ; Ask for destination directory
  26.  
  27. (set #destdir
  28.     (askdir
  29.         (prompt "Select destination directory. A directory called \"WebTV\" will be created here.")
  30.         (help @askdir-help)
  31.         (default @default-dest)
  32.     )
  33. )
  34. (set @default-dest (tackon #destdir "WebTV"))
  35.  
  36. ; Create installation directory and copy icon for it
  37.  
  38. (makedir
  39.     @default-dest
  40. )
  41.  
  42. (copyfiles
  43.     (source "/WebTV.info")
  44.     (dest #destdir)
  45. )
  46.  
  47. ; Copy files
  48.  
  49. (copyfiles
  50.     (prompt "The following files will be installed:")
  51.     (help @copyfiles-help)
  52.     (source "")
  53.     (choices "WebTV" "WebTV.guide" "Registration" "Register" "DockBrushes")
  54.     (dest @default-dest)
  55.     (confirm)
  56.     (infos)
  57. )
  58.  
  59. ; Ask which sites to install
  60.  
  61. (set #sitecats
  62.     (askoptions
  63.         (prompt "Select which catogories of sites you'd like installed:")
  64.         (help "WebTV comes with a list of web camera sites to get you started. "
  65.               "Hundreds of more cameras can be found on the world wide web.\n\n"
  66.               "The default list is catagorized so you easily can select which "
  67.               "camera sites to install.\n\n"
  68.               "Adult/Explicit - streaming webcams of explicit adult nature.\n"
  69.               "Adult/Women - webcams which occasionally show nudity.\n"
  70.               "Pubs and bars - various pubs and bars.\n"
  71.               "TV Online - 24 German TV channels updated every second.\n"
  72.               "Weather - various weather observing cameras.\n"
  73.               "Misc - cams which don't fit in any of the other catagories.\n")
  74.         (choices "pAdult/Explicit" "Adult/Women" "Pubs and bars" "TV Online" "Weather" "Misc")
  75.         (default 60)
  76.     )
  77. )
  78.  
  79. (if
  80.     (= #sitecats 0)
  81.  
  82.     (exit #exitmsg)
  83. )
  84.  
  85. ; Create sitefile from the chosen catagories
  86.  
  87. (set #newsitefile "WebTV.sites")
  88.  
  89. (delete #newsitefile)
  90.  
  91. (if
  92.     (bitand #sitecats 3)
  93.  
  94.     (textfile
  95.         (append "GroupOpen: Adult\n")
  96.         (dest #newsitefile)
  97.     )
  98. )
  99.  
  100. (if
  101.     (bitand #sitecats 1)
  102.  
  103.     (textfile
  104.         (include #newsitefile)
  105.         (include "WebTV-Explicit.sites")
  106.         (dest #newsitefile)
  107.     )
  108. )
  109.  
  110. (if
  111.     (bitand #sitecats 2)
  112.  
  113.     (textfile
  114.         (include #newsitefile)
  115.         (include "WebTV-Women.sites")
  116.         (dest #newsitefile)
  117.     )
  118. )
  119.  
  120. (if
  121.     (bitand #sitecats 3)
  122.  
  123.     (textfile
  124.         (include #newsitefile)
  125.         (append "GroupEnd\n")
  126.         (dest #newsitefile)
  127.     )
  128. )
  129.  
  130. (if
  131.     (bitand #sitecats 4)
  132.  
  133.     (textfile
  134.         (include #newsitefile)
  135.         (include "WebTV-Pubs&bars.sites")
  136.         (dest #newsitefile)
  137.     )
  138. )
  139.  
  140. (if
  141.     (bitand #sitecats 8)
  142.  
  143.     (textfile
  144.         (include #newsitefile)
  145.         (include "WebTV-TVOnline.sites")
  146.         (dest #newsitefile)
  147.     )
  148. )
  149.  
  150. (if
  151.     (bitand #sitecats 16)
  152.  
  153.     (textfile
  154.         (include #newsitefile)
  155.         (include "WebTV-Weather.sites")
  156.         (dest #newsitefile)
  157.     )
  158. )
  159.  
  160. (if
  161.     (bitand #sitecats 32)
  162.  
  163.     (textfile
  164.         (include #newsitefile)
  165.         (include "WebTV-Misc.sites")
  166.         (dest #newsitefile)
  167.     )
  168. )
  169.  
  170. ; Check for prior existance of sitefile
  171.  
  172. (set #oldsitefile (tackon @default-dest "WebTV.sites"))
  173.  
  174. (if
  175.     (exists #oldsitefile)
  176.  
  177.     (set #sitefilechoice
  178.         (askchoice
  179.             (prompt "You have a web camera site configuration file called WebTV.sites already.")
  180.             (help "Overwriting should be safe if you haven't configured any cameras of your own. Appending may create duplicate entries.")
  181.             (choices "pOverwrite old with new file" "Append new file to old one" "Put old sites into \"Old sites\" group" "Skip copying new file")
  182.             (default 2)
  183.         )
  184.     )
  185.  
  186.     (set #sitefilechoice 0)
  187. )
  188.  
  189. ; Overwrite
  190.  
  191. (if 
  192.     (= #sitefilechoice 0)
  193.  
  194.     (copyfiles
  195.         (source #newsitefile)
  196.         (dest @default-dest)
  197. ;        (optional force)
  198.     )
  199. )
  200.  
  201. ; Append
  202.  
  203. (if
  204.     (= #sitefilechoice 1)
  205.  
  206.     (textfile
  207.         (include #oldsitefile)
  208.         (include #newsitefile)
  209.         (dest #oldsitefile)
  210.     )
  211. )
  212.  
  213. ; Old sites into group
  214.  
  215. (if
  216.     (= #sitefilechoice 2)
  217.  
  218.     (textfile
  219.         (append "GroupClosed: Old sites\n")
  220.         (include #oldsitefile)
  221.         (append "GroupEnd\n")
  222.         (include #newsitefile)
  223.         (dest #oldsitefile)
  224.     )
  225. )
  226.  
  227. ; Exit
  228.  
  229. (exit #exitmsg)
  230.